body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.game-container {
    text-align: center;
}

#gameCanvas {
    border: 2px solid #333;
    background-color: #fff;
}

.score-container {
    margin: 10px 0;
    font-size: 18px;
}

.restart-count {
    margin: 10px 0;
    font-size: 18px;
}

.help-text {
    margin: 10px 0;
    font-size: 20px; /* 增加字体大小 */
    color: #ffff00; /* 亮黄色 */
    text-shadow: 2px 2px 4px black; /* 加强阴影效果 */
    font-weight: bold; /* 加粗字体 */
}

.controls {
    margin: 10px 0;
}

button {
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
}

button:hover {
    background-color: #45a049;
}

canvas {
    display: block;
    margin: 0 auto;
}

.speed-control {
    margin: 10px 0;
}

#speedRange {
    width: 200px;
    margin: 0 10px;
}

#speedValue {
    display: inline-block;
    width: 30px;
}

.game-info {
    transition: opacity 0.3s ease;
}

.canvas-container {
    position: relative;
    display: inline-block;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.canvas-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}